home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 420 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  113 lines

  1. Path: news.glas.apc.org!glas!sanya
  2. From: sanya@glas.apc.org
  3. Newsgroups: comp.lang.c
  4. Subject: HELP ME how to write RESIDENT progs
  5. Message-ID: <APC&63'0'14d05e82'c54@glas.apc.org>
  6. Date: Thu, 04 Jan 1996 23:49:20 +0300
  7. X-Gateway: notes@glas.apc.org
  8.  
  9.  
  10.  
  11.  HELP PLEASE !!
  12.  
  13.  
  14.  
  15.   I am trying to write a resident program whichwill stay in RAM
  16.  
  17.   and will begin to work if I press a special key combination
  18.  
  19.   called a HOT-KEY. It is always shown when you run a resident
  20.  
  21.   program for a first time.
  22.  
  23.  
  24.  
  25.   I am using a compiler where the KEEP() fuction makes the
  26.  
  27.   current program a resident one. I hope you are using this
  28.  
  29.   compiler, too.
  30.  
  31.  
  32.  
  33.   Here's my program.
  34.  
  35.  
  36.  
  37. #define CONTROL 0x04
  38.  
  39. #define LSHIFT  0x02
  40.  
  41.  
  42.  
  43. main()
  44.  
  45. {
  46.  
  47.  int x;
  48.  
  49.  
  50.  
  51.  puts("Hot-key is CONTROL-LEFTSHIFT.");
  52.  
  53.  
  54.  
  55.  keep(0,x);
  56.  
  57.  
  58.  
  59. /* 1st question: What is this PARAGRAPHS that KEEP() uses as
  60.  
  61.    a parameter. How can I get know how many paragraphs for my
  62.  
  63.    program is the ok size to do its functions. */
  64.  
  65.  
  66.  
  67. /* 2nd question: How can I get to this program code.
  68.  
  69.    When KEEP() quits, I don't know how I will continue
  70.  
  71.    program working and how can I check what key was
  72.  
  73.    pressed before the DOS will make this checking and
  74.  
  75.    will do function not what my program wants! */
  76.  
  77.  
  78.  
  79.  if(bioskey(2)==CONTROL|LSHIFT)
  80.  
  81.  {
  82.  
  83.   /* Here I insert the code which will be executed if
  84.  
  85.      a hot-key will be pressed by user. */
  86.  
  87.  }
  88.  
  89. } /* End of program */
  90.  
  91.  
  92.  
  93.   HELP PLEASE !! If you have free time and 1 or less ICS on
  94.  
  95.   your account please write me a letter as a conference response
  96.  
  97.   or, if you like, send directly to my mail address.
  98.  
  99.   I have some free pages especially for you.
  100.  
  101.  
  102.  
  103.         I think you'll not be angry that I
  104.  
  105.         have not yet drawn my own picture
  106.  
  107.         what I must place after letters.
  108.  
  109.  
  110.  
  111.   Sanya.
  112.  
  113.